<extend name="Public:base" />
<block name="content">
<!-- bootstrap & fontawesome -->
    <!-- <link rel="stylesheet" href="__JS__/../ace/assets/css/bootstrap.min.css"/> -->
    <!-- <link rel="stylesheet" href="__JS__/../ace/assets/font-awesome/4.2.0/css/font-awesome.min.css"/> -->
    <!-- <link rel="stylesheet" href="__JS__/../ace/assets/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style"/> -->
    <link rel="stylesheet" href="__JS__/../ace/assets/css/daterangepicker.min.css"/>
    <!--日期选择插件-->
    <link rel="stylesheet" href="__JS__/../css/new/common.css"/>
    <!-- <link rel="stylesheet" href="__JS__/../css/new/font-awesome.min.css"/> -->
    <!--公共css-->        <!--[if lte IE 9]>
    <link rel="stylesheet" href="__JS__/../ace/assets/css/ace-part2.min.css" class="ace-main-stylesheet"/>
    <link rel="stylesheet" href="__JS__/../ace/assets/css/ace-ie.min.css"/>        <![endif]-->

    <!--icely add-->
    <link rel="stylesheet" href="__JS__/../css/new/myStyle.css"/>
    <link rel="stylesheet" href="__JS__/../myPlugins/loading/loading.css"/>
    <link href="__JS__/../myPlugins/jqGrid/jqGrid/jqGrid.css" rel="stylesheet" type="text/css">

    <!-- ace 设置处理程序 -->
    <!-- <script src="__JS__/../ace/assets/js/ace-extra.min.js"></script> -->
    <!--[if lte IE 8]>
    <script src="__JS__/../ace/assets/js/html5shiv.min.js"></script>
    <script src="__JS__/../ace/assets/js/respond.min.js"></script>        <![endif]-->
<style>
    .showTicket{
        cursor: pointer;
    }
    .ticketDetail {
        font-size: 15px;
        margin: 1rem;
    }
    .ticketDetail div {
        padding: 0.6rem;
    }
    .ticketDetail div::after {
        content: "";
        width: 100%;
        height: 1px;
        background-color: #DDDDDD;
        display: block;
    }
    input{
        height: 34px;
    }
    .page-content{
        border: none;
    }
</style>



   

<!-- 基本页面内容 -->
<div class="page-content" style="border: none;">
    <!-- 选择电子券 -->
    <div id="ticket" style="display: none">

        <!-- 搜索框 -->
        <form class="form-inline" role="form" style="margin-bottom: 1rem;">
            <div class="form-group">
                <label class="sr-only" for="searchTicketID">searchTicketID</label>
                <input id="searchTicketID" type="number" placeholder="电子券编号"/>
            </div>
            <div class="form-group">
                <label class="sr-only" for="searchTicketName">searchTicketName</label>
                <input id="searchTicketName" type="text" placeholder="电子券名"/>
            </div>

            <div class="searchBtn btn btn-sm btn-primary width80">查询</div>
            <div class="resetBtn btn btn-sm btn-inverse width80">重置</div>
        </form>

        <!-- momo 表格（隐藏）-->
        <div class="sr-only">

            <div class="row">
                <div class="col-xs-12">
                    <div class="table-responsive">
                        <table class="table table-striped table-bordered table-hover dataTable">
                            <thead>
                            <tr>
                                <th>序号</th>
                                <th>券号</th>
                                <th>名称</th>
                                <th>面值</th>
                                <th>可用范围</th>
                                <th>可用条件</th>
                                <th>状态</th>
                                <th>有效期</th>
                                <th>类型</th>
                                <th>创建时间</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody id="ticketItemGroup"></tbody>
                        </table>
                    </div>
                    <div class="empty" style="display: none"><h3 class="no-comments center">
                        <i class="fa fa-exclamation-circle red" style="padding-right:8px"></i>无相关数据记录</h3></div>
                </div>
            </div>

            <!--底部页面选择栏-->
            <div class="pull-left marginTop20 fontSize15">每页显示 <span class="pageItemNum">10</span> 项，总
                <span class="sumItemNum">10</span> 项
            </div>
            <div class="pull-right">
                <div>
                    <ul class="pagination ">
                        <li class="prevBtn disabled"><span class="ace-icon fa fa-angle-double-left"></span></li>
                        <li class="nextBtn"><span class="ace-icon fa fa-angle-double-right"></span></li>
                        <li><span id="maxPageNum" class="hidden"></span></li>
                        <li><input id="inputPageNum" class="width60" type="number" min="1" placeholder="页数"/>
                        </li>
                        <li>
                            <div id="pageJump" class="btn btn-primary btn-sm width60">跳转</div>
                        </li>
                    </ul>
                </div>
            </div>

        </div>

        <!--icely 表格-->
        <div id="jqGrid" class="jqGrid jqGrid-center jqGrid-stripe"></div>

    </div>

    <div class="col-md-12">
        <!--表格内容-->
        <form class="form-horizontal" role="form">
            <div class="form-group">
                <div class="row col-md-12 margin-bottom-15">
                    <label class="col-md-1 control-label " style="text-align: left;font-size: 1.5rem;">名称:</label>

                    <div class="col-md-10">
                        <input class="name width-100" type="text" placeholder="名称限20个字符以内">
                    </div>
                </div>
                <div class="row col-md-12 margin-bottom-15">
                    <label class="col-md-1 control-label " style="text-align: left;font-size: 1.5rem;"> 有效期:</label>

                    <div class="col-md-10">
                        <div class="input-group">
                        <span class="input-group-addon">
			            <i class="fa fa-calendar bigger-110"></i>
                        </span>
                            <input class="time form-control" type="text" name="date-range-picker" id="datePicker" placeholder="开始时间-结束时间"/>
                        </div>
                    </div>
                </div>

                <div class="type2" style="display: none">
                    <div class="row col-md-12 margin-bottom-15">
                        <label class="col-md-1 control-label " style="text-align: left;padding-right: 0">参与时间:</label>

                        <div class="col-md-2">
                            <select class="form-control" id="joinStartTime">
                                <option value="0">0:00</option>
                                <option value="1">1:00</option>
                                <option value="2">2:00</option>
                                <option value="3">3:00</option>
                                <option value="4">4:00</option>
                                <option value="5">5:00</option>
                                <option value="6">6:00</option>
                                <option value="7">7:00</option>
                                <option value="8">8:00</option>
                                <option value="9">9:00</option>
                                <option value="10">10:00</option>
                                <option value="11">11:00</option>
                                <option value="12">12:00</option>
                                <option value="13">13:00</option>
                                <option value="14">14:00</option>
                                <option value="15">15:00</option>
                                <option value="16">16:00</option>
                                <option value="17">17:00</option>
                                <option value="18">18:00</option>
                                <option value="19">19:00</option>
                                <option value="20">20:00</option>
                                <option value="21">21:00</option>
                                <option value="22">22:00</option>
                                <option value="23">23:00</option>
                            </select>
                        </div>
                        <label class="control-label " style="float: left">---</label>

                        <div class="col-md-2">
                            <select class="form-control" id="joinEndTime">
                                <option value="1">1:00</option>
                                <option value="2">2:00</option>
                                <option value="3">3:00</option>
                                <option value="4">4:00</option>
                                <option value="5">5:00</option>
                                <option value="6">6:00</option>
                                <option value="7">7:00</option>
                                <option value="8">8:00</option>
                                <option value="9">9:00</option>
                                <option value="10">10:00</option>
                                <option value="11">11:00</option>
                                <option value="12">12:00</option>
                                <option value="13">13:00</option>
                                <option value="14">14:00</option>
                                <option value="15">15:00</option>
                                <option value="16">16:00</option>
                                <option value="17">17:00</option>
                                <option value="18">18:00</option>
                                <option value="19">19:00</option>
                                <option value="20">20:00</option>
                                <option value="21">21:00</option>
                                <option value="22">22:00</option>
                                <option value="23">23:00</option>
                                <option value="24">24:00</option>
                            </select>
                        </div>
                    </div>
                    <div class="row col-md-12 margin-bottom-15">
                        <label class="col-md-1 control-label " style="text-align: left;padding-right: 0">参与周期:</label>

                        <div class="col-md-2">
                            <select class="form-control" id="joinPeriod">
                                <option value="1">1小时</option>
                                <option value="2">2小时</option>
                                <option value="3">3小时</option>
                                <option value="4">4小时</option>
                                <option value="5">5小时</option>
                                <option value="6">6小时</option>
                                <option value="7">7小时</option>
                                <option value="8">8小时</option>
                                <option value="9">9小时</option>
                                <option value="10">10小时</option>
                                <option value="11">11小时</option>
                                <option value="12">12小时</option>
                            </select>
                        </div>
                        <div class="col-md-1 red timeNumText" style="margin-top: 10px;">日场次:&nbsp;1</div>
                    </div>

                </div>

                <div class="row col-md-12 margin-bottom-15">
                    <label class="col-md-1 control-label " style="text-align: left;font-size: 1.5rem;padding-right: 0;margin-right: 0px"> 转盘设置:</label>

                    <div class="col-md-10">
                        <div class="table-responsive">
                            <table class="table table-striped table-bordered table-hover dataTable">
                                <thead>
                                <tr>
                                    <th class="center col-md-1">序号</th>
                                    <th class="center col-md-3">显示内容</th>
                                    <th class="center col-md-3 ticketTitle">实际电子券</th>
                                    <th class="center col-md-3">库存</th>
                                    <th class="center col-md-2">合计</th>
                                </tr>
                                </thead>
                                <tbody id="lotteryBox" class="itemGroup">

                                <th class="center">1</th>
                                <th class="center">谢谢参与</th>
                                <th class="center">无</th>
                                <th class="center">无限</th>
                                <th class="center">0</th>
                                </tr>
                                <tr>
                                    <th class="center index">2</th>
                                    <th class="center "><input type="text" class="lotteryName"/></th>
                                    <td class="center ticketName" data-id="-1" data-values="0">
                                        <a class="showTicket">选择</a>
                                    </td>
                                    <th class="center "><input type="number" class="lotteryNum"/></th>
                                    <th class="center valueSum">0</th>
                                </tr>
                                <tr>
                                    <th class="center index">3</th>
                                    <th class="center "><input type="text" class="lotteryName"/></th>
                                    <td class="center ticketName" data-id="-1" data-values="0">
                                        <a class="showTicket">选择</a>
                                    </td>

                                    <th class="center "><input type="number" class="lotteryNum"/></th>
                                    <th class="center valueSum">0</th>
                                </tr>
                                <tr>
                                    <th class="center index">4</th>
                                    <th class="center "><input type="text" class="lotteryName"/></th>
                                    <td class="center ticketName" data-id="-1" data-values="0">
                                        <a class="showTicket">选择</a>
                                    </td>

                                    <th class="center "><input type="number" class="lotteryNum"/></th>
                                    <th class="center valueSum">0</th>
                                </tr>
                                <tr>
                                    <th class="center index">5</th>
                                    <th class="center "><input type="text" class="lotteryName"/></th>
                                    <td class="center ticketName" data-id="-1" data-values="0">
                                        <a class="showTicket">选择</a>
                                    </td>

                                    <th class="center "><input type="number" class="lotteryNum"/></th>
                                    <th class="center valueSum">0</th>
                                </tr>
                                <tr>
                                    <th class="center index">6</th>
                                    <th class="center "><input type="text" class="lotteryName"/></th>
                                    <td class="center ticketName" data-id="-1" data-values="0">
                                        <a class="showTicket">选择</a>
                                    </td>

                                    <th class="center "><input type="number" class="lotteryNum"/></th>
                                    <th class="center valueSum">0</th>
                                </tr>
                                <tr>
                                    <th class="center index">7</th>
                                    <th class="center "><input type="text" class="lotteryName"/></th>
                                    <td class="center ticketName" data-id="-1" data-values="0">
                                        <a class="showTicket">选择</a>
                                    </td>

                                    <th class="center "><input type="number" class="lotteryNum"/></th>
                                    <th class="center valueSum">0</th>
                                </tr>
                                <th class="center index">8</th>
                                <th class="center "><input type="text" class="lotteryName"/></th>
                                <td class="center ticketName" data-id="-1" data-values="0">
                                    <a class="showTicket">选择</a>
                                </td>

                                <th class="center "><input type="number" class="lotteryNum"/></th>
                                <th class="center valueSum">0</th>
                                </tr>
                                <tr>
                                    <th class="center" colspan="4">合计</th>
                                    <th class="center allSum">0</th>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>

                <div class="row col-md-12 margin-bottom-15">
                    <label class="col-md-1 control-label " style="text-align: left;font-size: 1.5rem;">统计:</label>

                    <div class="col-md-10">
                        <div class="table-responsive">
                            <table class="table table-striped table-bordered table-hover dataTable">
                                <thead>
                                <tr>
                                    <th class="center type2" style="display: none">单场奖池金额</th>
                                    <th class="center">每日场次</th>
                                    <th class="center">日奖池（元）</th>
                                    <th class="center">总奖池</th>
                                </tr>
                                </thead>
                                <tbody id="moneySet">
                                <tr>
                                    <th class="center type2 oneSum" style="display: none">0</th>
                                    <th class="center timeNum">1</th>
                                    <th class="center daySum">0</th>
                                    <th class="center allSum2">0</th>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <br><br><br><br><br>

                <div class="row col-md-12">
                    <label class="col-md-1 control-label " style="text-align: left;font-size: 1.5rem;">备注:</label>

                    <div class="col-md-10">
                        <textarea type="text" class="remark" placeholder="备注内容限定在150字以内" style="width: 100%;height:250px;margin-bottom: 20px"></textarea>
                    </div>
                </div>

            </div>
        </form>
    </div>

    <div class="row col-md-12">
        <div class="col-md-6 ">
            <div class="submitBtn btn btn-primary pull-right center" style="width: 150px">保存</div>
        </div>
        <div class="col-md-6 ">
            <div class="cancelBtn2 btn pull-left center" style="width: 150px">取消</div>
        </div>
    </div>

</div>
<input type="hidden" name="type" value="{$type}" id="activity_type">
<input type="hidden" name="type" value="{$id}" id="activity_id">
<!-- 选择电子券 -->
<script type="text/template" id="ticketItem">
    <tr>
        <th class="col-md-1"><%=index%></th>
        <th class="col-md-1 ticketID" style="display: none"><%=id%></th>
        <th class="col-md-1 ticketNumber"><%=ticketNumber%></th>
        <th class="col-md-1 ticketName"><%=name%></th>
        <th class="col-md-1 ticketValue"><%=value%></th>
        <th class="col-md-2"><%=useRange%></th>
        <th class="col-md-1"><%=useCondition%></th>
        <th class="col-md-1"><%=status%></th>
        <th class="col-md-2"><p><%=start_at%></p><p><%=end_at%></p></th>
        <th class="col-md-1"><%=type%></th>
        <th class="col-md-2"><%=createTime%></th>
        <th>
            <a class="selectTicketBtn btn btn-mini btn-primary">选择</a>
        </th>
    </tr>
</script>

<!--电子券详情模块-->
<script type="text/template" id="ticketDetailItem">
    <div class="ticketDetail">
        <div class="row ">电子券名称：<%=name%></div>
        <div class="row ">面值：<%=value%></div>
        <div class="row ">类型：<span class="green"><%=type%></span></div>
        <div class="row ">可用范围：<%=range%></div>
        <div class="row ">可用条件：<%=condition%></div>
        <div class="row ">有效期：开始时间：<%=start_at%> &nbsp;结束时间：<%=end_at%></div>
        <div class="row ">状态：<span class="green"><%=status%></span></div>
    </div>
</script>

<!-- bootstrap -->
<script src="__JS__/../ace/assets/js/jquery.1.11.1.min.js"></script>
<script src="__JS__/../ace/assets/js/bootstrap.min.js"></script>
<!-- 日期选择插件 -->
<script src="__JS__/../ace/assets/js/moment.min.js"></script>
<script src="__JS__/../ace/assets/js/daterangepicker.min.js"></script>
<!-- ACE 基本JS -->
<!-- <script src="__JS__/../ace/assets/js/ace-elements.min.js"></script> -->
<!-- <script src="__JS__/../ace/assets/js/ace.min.js"></script> -->
<script src="__JS__/libs/hint.js"></script>
<script src="__JS__/../ace/assets/js/bootbox.min.js"></script>
<!-- 公共JS -->
<script src="__JS__/new/momo.js"></script>

<!--icely add-->
<script src="__JS__/../myPlugins/jqGrid/jqGrid/jqGrid.js"></script>
<script src="__JS__/../myPlugins/loading/loading.js"></script>
<script src="__JS__/new/lottery_new.js"></script>
<script type="text/javascript">
    init();
</script>
</block>
